<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>FACOPOLY:  Fichier source de /home/etu/g/p0804564/facopoly/src/CARTE.c</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">FACOPOLY
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Généré par Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
      <li><a href="dirs.html"><span>Répertoires</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Membres&#160;de&#160;fichier</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_c_a_r_t_e_8c.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">CARTE.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_c_a_r_t_e_8c.html">Aller à la documentation de ce fichier.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00002"></a>00002 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00003"></a>00003 <span class="preprocessor">#include &lt;assert.h&gt;</span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;time.h&quot;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &quot;string.h&quot;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;<a class="code" href="_c_a_r_t_e_8h.html" title="facopoly  Permet de créer les cartes de jeu">CARTE.h</a>&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;<a class="code" href="_c_a_s_e_8h.html" title="facopoly  Permet de créer et gérer les différentes cases du jeu">CASE.h</a>&quot;</span>
<a name="l00009"></a>00009 
<a name="l00010"></a><a class="code" href="_c_a_r_t_e_8h.html#ad951fe1690eb94c7512b0e8f12ef8174">00010</a> <a class="code" href="struct_c_a_r_t_e.html" title="Module des cartes de jeu.">JEUCARTES</a> <a class="code" href="_c_a_r_t_e_8c.html#ad951fe1690eb94c7512b0e8f12ef8174" title="Initialisation des cartes de jeu.">carInit_Carte</a>()
<a name="l00011"></a>00011 {
<a name="l00012"></a>00012     <a class="code" href="struct_c_a_r_t_e.html" title="Module des cartes de jeu.">JEUCARTES</a> tabcarte = (<a class="code" href="struct_c_a_r_t_e.html" title="Module des cartes de jeu.">CARTE</a>*)malloc(24*<span class="keyword">sizeof</span>(<a class="code" href="struct_c_a_r_t_e.html" title="Module des cartes de jeu.">CARTE</a>));
<a name="l00013"></a>00013 
<a name="l00014"></a>00014       <span class="comment">/*Les cartes mail*/</span>
<a name="l00015"></a>00015         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daeeafd446b55779044518979ab18059b2">Mcar1</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00016"></a>00016         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daeeafd446b55779044518979ab18059b2">Mcar1</a>].consigne, <span class="stringliteral">&quot;Perte de points pour excès de vitesse. Vous perdez 7 points.&quot;</span>);
<a name="l00017"></a>00017 
<a name="l00018"></a>00018         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da8d05cf68a2d5d906a362bcd675bceaab">Mcar2</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00019"></a>00019         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da8d05cf68a2d5d906a362bcd675bceaab">Mcar2</a>].consigne,<span class="stringliteral">&quot;Perte de points pour ivresse. Vous perdez 7 points.&quot;</span>);
<a name="l00020"></a>00020 
<a name="l00021"></a>00021         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dad1594bcbafa1f77d1e5a328f2bc43522">Mcar3</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00022"></a>00022         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dad1594bcbafa1f77d1e5a328f2bc43522">Mcar3</a>].consigne,<span class="stringliteral">&quot;Avancez jusqu&#39;aux inscriptions pédagogiques. Vous recevez 5 points&quot;</span>);
<a name="l00023"></a>00023 
<a name="l00024"></a>00024         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da269ebcf5fa697a381bbf02f1b1f624ed">Mcar4</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00025"></a>00025         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da269ebcf5fa697a381bbf02f1b1f624ed">Mcar4</a>].consigne,<span class="stringliteral">&quot;Payez les frais de scolarité. Vous perdez 10 points.&quot;</span>);
<a name="l00026"></a>00026 
<a name="l00027"></a>00027         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da024db5e82ae57870e5f6dbab6790339d">Mcar5</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00028"></a>00028         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da024db5e82ae57870e5f6dbab6790339d">Mcar5</a>].consigne,<span class="stringliteral">&quot;CERTIFICAT MEDICAL. Votre présence en partiel n&#39;est pas obligatoire. Cette carte peut être conservée jusqu&#39;à ce qu&#39;elle soit utilisée ou vendue.&quot;</span>);
<a name="l00029"></a>00029 
<a name="l00030"></a>00030         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da3637553dbce29b11aceff3d113995792">Mcar6</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00031"></a>00031         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da3637553dbce29b11aceff3d113995792">Mcar6</a>].consigne,<span class="stringliteral">&quot;Allez en partiel, avancez tout droit en partiel, ne passez pas par les inscriptions pédagogiques, ne recevez pas 5 points.&quot;</span>);
<a name="l00032"></a>00032 
<a name="l00033"></a>00033         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daad12bb1fad87ef1e7effc7f79e8422fa">Mcar7</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00034"></a>00034         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daad12bb1fad87ef1e7effc7f79e8422fa">Mcar7</a>].consigne,<span class="stringliteral">&quot;Vous avez gagné le prix du meilleur geek. Vous gagnez 2 points.&quot;</span>);
<a name="l00035"></a>00035 
<a name="l00036"></a>00036         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da0d9a29a4c03c46b60ce6e2b9017bcbbd">Mcar8</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00037"></a>00037         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da0d9a29a4c03c46b60ce6e2b9017bcbbd">Mcar8</a>].consigne,<span class="stringliteral">&quot;Reculez de 3 cases.&quot;</span>);
<a name="l00038"></a>00038 
<a name="l00039"></a>00039         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daf1664cf3dfbc2b63350e22f4a4cd1480">Mcar9</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00040"></a>00040         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daf1664cf3dfbc2b63350e22f4a4cd1480">Mcar9</a>].consigne,<span class="stringliteral">&quot;Faites des réparations dans vos bâtiments au lieu de réviser. Vous perdez 3 points.&quot;</span>);
<a name="l00041"></a>00041 
<a name="l00042"></a>00042         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daaa656401c56fffd455d838095ca2f992">Mcar10</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00043"></a>00043         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daaa656401c56fffd455d838095ca2f992">Mcar10</a>].consigne,<span class="stringliteral">&quot;Vous avez un TP de LIF7. Rendez-vous à Nautibus.&quot;</span>);
<a name="l00044"></a>00044 
<a name="l00045"></a>00045         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da92849681ebacf953297b6b9e179d97db">Mcar11</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00046"></a>00046         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da92849681ebacf953297b6b9e179d97db">Mcar11</a>].consigne,<span class="stringliteral">&quot;Le CM d&#39;analyse n&#39;est pas terminé. Retournez à l&#39;amphithéâtre Jordan.&quot;</span>);
<a name="l00047"></a>00047 
<a name="l00048"></a>00048         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da6a4e2e777aa945d84fa2cf11fa38e831">Mcar12</a>].type,<span class="stringliteral">&quot;mail&quot;</span>);
<a name="l00049"></a>00049         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da6a4e2e777aa945d84fa2cf11fa38e831">Mcar12</a>].consigne,<span class="stringliteral">&quot;Allez emprunter un livre d&#39;algèbre à l&#39;étage 4 de la BU. Si vous passez par les IP, recevez 5 points.&quot;</span>);
<a name="l00050"></a>00050 
<a name="l00051"></a>00051     <span class="comment">/*Les cartes référent pédagogique*/</span>
<a name="l00052"></a>00052         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da5a9ea898efb97a74bad53ac2274a64e9">RPcar1</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00053"></a>00053         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da5a9ea898efb97a74bad53ac2274a64e9">RPcar1</a>].consigne,<span class="stringliteral">&quot;Vous êtes en progrès. Vous recevez 2 points d&#39;encouragements.&quot;</span>);
<a name="l00054"></a>00054 
<a name="l00055"></a>00055         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da700e63814fbe857de72d0090145355e4">RPcar2</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00056"></a>00056         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da700e63814fbe857de72d0090145355e4">RPcar2</a>].consigne,<span class="stringliteral">&quot;UN NOUVEAU MESSAGE. Tirez une carte mail.&quot;</span>);
<a name="l00057"></a>00057 
<a name="l00058"></a>00058         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dab3f96c286efe44c2611a76d6e600dd5d">RPcar3</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00059"></a>00059         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dab3f96c286efe44c2611a76d6e600dd5d">RPcar3</a>].consigne,<span class="stringliteral">&quot;Avancez jusqu&#39;aux inscriptions pédagogiques. Vous gagnez 5 points&quot;</span>);
<a name="l00060"></a>00060 
<a name="l00061"></a>00061         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da0faabe2fcc7c1d266bbfa4fdd7bb88ca">RPcar4</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00062"></a>00062         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da0faabe2fcc7c1d266bbfa4fdd7bb88ca">RPcar4</a>].consigne,<span class="stringliteral">&quot;Assurance surveillance partiel. Vous perdez 2 points.&quot;</span>);
<a name="l00063"></a>00063 
<a name="l00064"></a>00064         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dae4fbf84b22f88267d2b18ef5eb195e8f">RPcar5</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00065"></a>00065         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dae4fbf84b22f88267d2b18ef5eb195e8f">RPcar5</a>].consigne,<span class="stringliteral">&quot;CERTIFICAT MEDICAL. Votre présence en partiel n&#39;est pas obligatoire. (Cette carte peut être conservée jusqu&#39;à ce qu&#39;elle soit utilisée ou vendue.&quot;</span>);
<a name="l00066"></a>00066 
<a name="l00067"></a>00067         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da1986657ac724bf83ebcbe9d13e8385ba">RPcar6</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00068"></a>00068         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da1986657ac724bf83ebcbe9d13e8385ba">RPcar6</a>].consigne,<span class="stringliteral">&quot;Allez en partiel, avancez tout droit en partiel, ne passez pas par les inscriptions pédagogiques, ne recevez pas 5 points.&quot;</span>);
<a name="l00069"></a>00069 
<a name="l00070"></a>00070         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dae928a0fa6561fc649366d97a461941c5">RPcar7</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00071"></a>00071         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dae928a0fa6561fc649366d97a461941c5">RPcar7</a>].consigne,<span class="stringliteral">&quot;Note du médecin pour un certificat médical. Vous perdez 10 points.&quot;</span>);
<a name="l00072"></a>00072 
<a name="l00073"></a>00073         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da413008a2fe71d43bf297753201fef823">RPcar8</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00074"></a>00074         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da413008a2fe71d43bf297753201fef823">RPcar8</a>].consigne,<span class="stringliteral">&quot;C&#39;est votre anniversaire : chaque joueur doit vous donner 2 points.&quot;</span>);
<a name="l00075"></a>00075 
<a name="l00076"></a>00076         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daef2961e9b1c3cf1273b74b9d9870971c">RPcar9</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00077"></a>00077         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daef2961e9b1c3cf1273b74b9d9870971c">RPcar9</a>].consigne,<span class="stringliteral">&quot;Vous avez gagné le prix de mathématiques. Bravo. Vous gagnez 4 points.&quot;</span>);
<a name="l00078"></a>00078 
<a name="l00079"></a>00079         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da59a39f8100a341da487e76ec7d0e3218">RPcar10</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00080"></a>00080         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da59a39f8100a341da487e76ec7d0e3218">RPcar10</a>].consigne,<span class="stringliteral">&quot;Erreur dans la correction de copies en votre faveur. Vous récupérez 3 points.&quot;</span>);
<a name="l00081"></a>00081 
<a name="l00082"></a>00082         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dafcfe0ebedfe66e338f71ff61fa93d47b">RPcar11</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00083"></a>00083         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dafcfe0ebedfe66e338f71ff61fa93d47b">RPcar11</a>].consigne,<span class="stringliteral">&quot;Retournez au quai 43. Vous êtes bloqué à cause de l&#39;attente. Passez un tour.&quot;</span>);
<a name="l00084"></a>00084 
<a name="l00085"></a>00085         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da2a0c4a5ca03ef68f4640b00664d24f2e">RPcar12</a>].type,<span class="stringliteral">&quot;referent pedagogique&quot;</span>);
<a name="l00086"></a>00086         strcpy(tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da2a0c4a5ca03ef68f4640b00664d24f2e">RPcar12</a>].consigne,<span class="stringliteral">&quot;Avancez de 2 cases.&quot;</span>);
<a name="l00087"></a>00087 
<a name="l00088"></a>00088     <span class="keywordflow">return</span> tabcarte;
<a name="l00089"></a>00089 }
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 
<a name="l00092"></a><a class="code" href="_c_a_r_t_e_8h.html#affe9077215b7a243468d46ca2bc1c59c">00092</a> <span class="keywordtype">void</span> <a class="code" href="_c_a_r_t_e_8c.html#affe9077215b7a243468d46ca2bc1c59c" title="tirage d&#39;une carte">carTirage_Carte</a>(<a class="code" href="struct_c_a_r_t_e.html" title="Module des cartes de jeu.">CARTE</a> *car, <a class="code" href="struct_c_a_s_e.html" title="Module des cases du jeu.">CASE</a> ca, <a class="code" href="struct_c_a_r_t_e.html" title="Module des cartes de jeu.">JEUCARTES</a>* tabcarte)
<a name="l00093"></a>00093 {
<a name="l00094"></a>00094      srand(time(NULL));
<a name="l00095"></a>00095      <span class="keywordtype">int</span> res_mail=(rand() % (12)) + 1;
<a name="l00096"></a>00096      <span class="keywordtype">int</span> res_refped=(rand() % (12)) + 1;
<a name="l00097"></a>00097 
<a name="l00098"></a>00098      <span class="keywordflow">if</span> (strcmp(ca.<a class="code" href="struct_c_a_s_e.html#ab5f221d611ae7b62e9b3d4da5cc33d3e">couleur</a>, <span class="stringliteral">&quot;Referent Pedagogique&quot;</span>))
<a name="l00099"></a>00099      {
<a name="l00100"></a>00100         <span class="keywordflow">if</span> (res_mail==1)
<a name="l00101"></a>00101         {
<a name="l00102"></a>00102             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daeeafd446b55779044518979ab18059b2">Mcar1</a>];
<a name="l00103"></a>00103         }
<a name="l00104"></a>00104         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_mail==2)
<a name="l00105"></a>00105         {
<a name="l00106"></a>00106             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da8d05cf68a2d5d906a362bcd675bceaab">Mcar2</a>];
<a name="l00107"></a>00107         }
<a name="l00108"></a>00108         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_mail==3)
<a name="l00109"></a>00109         {
<a name="l00110"></a>00110             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dad1594bcbafa1f77d1e5a328f2bc43522">Mcar3</a>];
<a name="l00111"></a>00111         }
<a name="l00112"></a>00112         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_mail==4)
<a name="l00113"></a>00113         {
<a name="l00114"></a>00114             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da269ebcf5fa697a381bbf02f1b1f624ed">Mcar4</a>];
<a name="l00115"></a>00115         }
<a name="l00116"></a>00116         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_mail==5)
<a name="l00117"></a>00117         {
<a name="l00118"></a>00118             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da024db5e82ae57870e5f6dbab6790339d">Mcar5</a>];
<a name="l00119"></a>00119         }
<a name="l00120"></a>00120         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_mail==6)
<a name="l00121"></a>00121         {
<a name="l00122"></a>00122             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da3637553dbce29b11aceff3d113995792">Mcar6</a>];
<a name="l00123"></a>00123         }
<a name="l00124"></a>00124         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_mail==7)
<a name="l00125"></a>00125         {
<a name="l00126"></a>00126             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daad12bb1fad87ef1e7effc7f79e8422fa">Mcar7</a>];
<a name="l00127"></a>00127         }
<a name="l00128"></a>00128         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_mail==8)
<a name="l00129"></a>00129         {
<a name="l00130"></a>00130             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da0d9a29a4c03c46b60ce6e2b9017bcbbd">Mcar8</a>];
<a name="l00131"></a>00131         }
<a name="l00132"></a>00132         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_mail==9)
<a name="l00133"></a>00133         {
<a name="l00134"></a>00134             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daf1664cf3dfbc2b63350e22f4a4cd1480">Mcar9</a>];
<a name="l00135"></a>00135         }
<a name="l00136"></a>00136         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_mail==10)
<a name="l00137"></a>00137         {
<a name="l00138"></a>00138             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daaa656401c56fffd455d838095ca2f992">Mcar10</a>];
<a name="l00139"></a>00139         }
<a name="l00140"></a>00140         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_mail==11)
<a name="l00141"></a>00141         {
<a name="l00142"></a>00142             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da92849681ebacf953297b6b9e179d97db">Mcar11</a>];
<a name="l00143"></a>00143         }
<a name="l00144"></a>00144         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_mail==12)
<a name="l00145"></a>00145         {
<a name="l00146"></a>00146             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da6a4e2e777aa945d84fa2cf11fa38e831">Mcar12</a>];
<a name="l00147"></a>00147         }
<a name="l00148"></a>00148      }
<a name="l00149"></a>00149 
<a name="l00150"></a>00150      <span class="keywordflow">if</span> (strcmp(ca.<a class="code" href="struct_c_a_s_e.html#ab5f221d611ae7b62e9b3d4da5cc33d3e">couleur</a>,<span class="stringliteral">&quot;MAIL&quot;</span>))
<a name="l00151"></a>00151      {
<a name="l00152"></a>00152         <span class="keywordflow">if</span> (res_refped==1)
<a name="l00153"></a>00153         {
<a name="l00154"></a>00154          car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da5a9ea898efb97a74bad53ac2274a64e9">RPcar1</a>];
<a name="l00155"></a>00155         }
<a name="l00156"></a>00156         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_refped==2)
<a name="l00157"></a>00157         {
<a name="l00158"></a>00158             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da700e63814fbe857de72d0090145355e4">RPcar2</a>];
<a name="l00159"></a>00159         }
<a name="l00160"></a>00160         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_refped==3)
<a name="l00161"></a>00161         {
<a name="l00162"></a>00162             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dab3f96c286efe44c2611a76d6e600dd5d">RPcar3</a>];
<a name="l00163"></a>00163         }
<a name="l00164"></a>00164         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_refped==4)
<a name="l00165"></a>00165         {
<a name="l00166"></a>00166             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da0faabe2fcc7c1d266bbfa4fdd7bb88ca">RPcar4</a>];
<a name="l00167"></a>00167         }
<a name="l00168"></a>00168         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_refped==5)
<a name="l00169"></a>00169         {
<a name="l00170"></a>00170             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dae4fbf84b22f88267d2b18ef5eb195e8f">RPcar5</a>];
<a name="l00171"></a>00171         }
<a name="l00172"></a>00172         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_refped==6)
<a name="l00173"></a>00173         {
<a name="l00174"></a>00174             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da1986657ac724bf83ebcbe9d13e8385ba">RPcar6</a>];
<a name="l00175"></a>00175         }
<a name="l00176"></a>00176         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_refped==7)
<a name="l00177"></a>00177         {
<a name="l00178"></a>00178             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dae928a0fa6561fc649366d97a461941c5">RPcar7</a>];
<a name="l00179"></a>00179         }
<a name="l00180"></a>00180         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_refped==8)
<a name="l00181"></a>00181         {
<a name="l00182"></a>00182             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da413008a2fe71d43bf297753201fef823">RPcar8</a>];
<a name="l00183"></a>00183         }
<a name="l00184"></a>00184         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_refped==9)
<a name="l00185"></a>00185         {
<a name="l00186"></a>00186             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713daef2961e9b1c3cf1273b74b9d9870971c">RPcar9</a>];
<a name="l00187"></a>00187         }
<a name="l00188"></a>00188         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_refped==10)
<a name="l00189"></a>00189         {
<a name="l00190"></a>00190             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da59a39f8100a341da487e76ec7d0e3218">RPcar10</a>];
<a name="l00191"></a>00191         }
<a name="l00192"></a>00192         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_refped==11)
<a name="l00193"></a>00193         {
<a name="l00194"></a>00194             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713dafcfe0ebedfe66e338f71ff61fa93d47b">RPcar11</a>];
<a name="l00195"></a>00195         }
<a name="l00196"></a>00196         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res_refped==12)
<a name="l00197"></a>00197         {
<a name="l00198"></a>00198             car=tabcarte[<a class="code" href="_c_a_r_t_e_8h.html#a9bbd695a6849d5b0e3f79cf7ca9b713da2a0c4a5ca03ef68f4640b00664d24f2e">RPcar12</a>];
<a name="l00199"></a>00199         }
<a name="l00200"></a>00200      }
<a name="l00201"></a>00201 }
</pre></div></div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_c_a_r_t_e_8c.html">CARTE.c</a>      </li>

    <li class="footer">Généré le Mardi Mai 14 2013 08:10:33 pour FACOPOLY par
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
